<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style media="screen">
    </style>
</head>
<body>
    <div id="root"></div>
    <script src="../../js/react.js" charset="utf-8"></script>
    <script src="../../js/react-dom.js" charset="utf-8"></script>
    <script src="../../js/browser.min.js" charset="utf-8"></script>
    <script type="text/babel">

        class NameForm extends React.Component {
            constructor(props) {
                super(props);
                this.handleSubmit = this.handleSubmit.bind(this);
            }

            handleSubmit(event) {
                alert('A name was submitted: ' + this.input.value);
                event.preventDefault();
            }

            render() {
                return (
                  <form onSubmit={this.handleSubmit}>
                    <label>
                      Name:
                      <input type="text" ref={(input) => this.input = input} />
                    </label>
                    <input type="submit" value="Submit" />
                  </form>
                );
            }
        }
    </script>
</body>
</html>
